package com.church.action;

import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.church.db.Qanda;
import com.church.services.QandaServices;
import com.opensymphony.xwork2.ActionSupport;

public class GetQandaList extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 30L;
	private QandaServices qandaServices;
	private List<Qanda> qandaList;
	private String subject;

	public QandaServices getQandaServices() {
		return qandaServices;
	}

	public void setQandaServices(QandaServices qandaServices) {
		this.qandaServices = qandaServices;
	}

	public List<Qanda> getQandaList() {
		return qandaList;
	}

	public void setQandaList(List<Qanda> qandaList) {
		this.qandaList = qandaList;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String execute() {
		qandaList = qandaServices.getQandaBySubject(subject);
		System.out.println("run************************************");
		return "success";
	}
}
